package Io;

import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.Scanner;

public class Text {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos=new FileOutputStream("note.txt",true);
        Scanner scan=new Scanner(System.in);
        System.out.println("输入内容  输入exit退出");
        for (int i=0;i<1;i--){
            String line=scan.nextLine();
            if ("exit".equalsIgnoreCase(line)){
                break;
            }
            fos.write(line.getBytes(StandardCharsets.UTF_8));
            System.out.println("请继续输入");
        }
        System.out.println("写完了");
        fos.close();
    }
}
